home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3c / rexec.z / rexec
Encoding:
Text File  |  2002-10-03  |  3.5 KB  |  67 lines

  1.  
  2.  
  3.  
  4. RRRREEEEXXXXEEEECCCC((((3333NNNN))))                                                            RRRREEEEXXXXEEEECCCC((((3333NNNN))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      rexec - return stream to a remote command
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      iiiinnnntttt rrrreeeexxxxeeeecccc((((cccchhhhaaaarrrr ********aaaahhhhoooosssstttt,,,, iiiinnnntttt iiiinnnnppppoooorrrrtttt,,,, cccchhhhaaaarrrr ****uuuusssseeeerrrr,,,, cccchhhhaaaarrrr ****ppppaaaasssssssswwwwdddd,,,,
  13.                cccchhhhaaaarrrr ****ccccmmmmdddd,,,, iiiinnnntttt ****ffffdddd2222pppp))));;;;
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      _R_e_x_e_c looks up the host *_a_h_o_s_t using _g_e_t_h_o_s_t_b_y_n_a_m_e(3N), returning -1 if
  17.      the host does not exist.  Otherwise *_a_h_o_s_t is set to the standard name of
  18.      the host.  If a username and password are both specified, then these are
  19.      used to authenticate to the foreign host; otherwise the environment and
  20.      then the user's ._n_e_t_r_c file in his home directory are searched for
  21.      appropriate information.  If all this fails, the user is prompted for the
  22.      information.
  23.  
  24.      The port _i_n_p_o_r_t specifies which well-known DARPA Internet port to use for
  25.      the connection; the call ``getservbyname("exec", "tcp")'' (see
  26.      _g_e_t_s_e_r_v_e_n_t(3N)) will return a pointer to a structure, which contains the
  27.      necessary port.  The protocol for connection is described in detail in
  28.      _r_e_x_e_c_d(1M).  NNNNOOOOTTTTEEEE: password aging is not supported by the the _r_e_x_e_c_d(1M)
  29.      daemon in this implementation.
  30.  
  31.      If the connection succeeds, a socket in the Internet domain of type
  32.      SOCK_STREAM is returned to the caller, and given to the remote command as
  33.      ssssttttddddiiiinnnn and ssssttttddddoooouuuutttt.  If _f_d_2_p is non-zero, then an auxiliary channel to a
  34.      control process will be setup, and a descriptor for it will be placed in
  35.      *_f_d_2_p.  The control process will return diagnostic output from the
  36.      command (unit 2) on this channel, and will also accept bytes on this
  37.      channel as being UNIX signal numbers, to be forwarded to the process
  38.      group of the command.  The diagnostic information returned does not
  39.      include remote authorization failure, as the secondary connection is set
  40.      up after authorization has been verified.  If _f_d_2_p is 0, then the ssssttttddddeeeerrrrrrrr
  41.      (unit 2 of the remote command) will be made the same as the ssssttttddddoooouuuutttt and no
  42.      provision is made for sending arbitrary signals to the remote process,
  43.      although you may be able to get its attention by using out-of-band data.
  44.  
  45. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  46.      _R_e_x_e_c returns a valid socket descriptor on success.  It returns -1 on
  47.      error and prints a diagnostic message on the standard error.
  48.  
  49. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  50.      rcmd(3N), rexecd(1M)
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.